package com.sugar.subscribe.course.module.business.job.order;

import com.sugar.subscribe.course.framework.quartz.core.handler.JobHandler;
import com.sugar.subscribe.course.module.business.service.order.OrderService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 3天自动确认未确认的订单
 *
 * @author Y.sugar
 * @since 2024/12/27 11:23
 */
@Component
public class AutoConfirmOrderJob implements JobHandler {

    @Resource
    private OrderService orderService;

    @Override
    public String execute(String param) throws Exception {
        return String.format("【订单自动确认任务】有 %d 个订单未自动确认成功", orderService.autoConfirmOrder());
    }
}
